{% extends 'CaisseBundle::layout.html.twig' %} 
{% block body %} 

<div id="body_section">
  <div id="body_section_inner">
<div class="contentPageWrapper">
	 
    <!-- register form -->
    <div class="pageSectionMain ui-corner-all">
        <div class="pageSectionMainInternal">
            <div id="pageHeader">
       
                <h2>{% if id == '' %}Nouveau serveur{% else %}Modifier le serveur{% endif %}</h2>
            </div>
            <div>
                <p class="introText">
                    SVP completez les données suivantes pour ce serveur .   </p>
                    <script type='text/javascript' src='/js/jquery-1.7.2.min.js?ver=3.4.1'></script>
                    <script type="text/javascript" src="js/gen_validatorv4.js"></script>
                    <form enctype="multipart/form-data" class="international" method="post" action="{{path('caisse_ajout_serveur')}}" id="form-join" name="addproduct" {{form_enctype(form)}}>
                <input type="hidden" name="MAX_FILE_SIZE" value="204800">
                    <ul><input type="hidden" value="{{id}}" name="id" />
                        <li class="field-container"><label for="pr_code">
                                <span class="field-name">Nom</span>
                                <div class="form_input">
                                                  {{form_widget(form._token)}} {{ form_widget(form.nom,{'attr':{'class':'large'}})}}  
                                        </div>     
                        </li>
                        
			<li class="field-container"><label for="pr_name">
			<span class="field-name">Prénom</span>
                               </label>
                             <div class="form_input">
						{{ form_widget(form.prenom,{'attr':{'class':'large'}})}}  
                                            </div>
                                        </li>
                                        
                            <li class="field-container">
                            <label for="unit">
                                <span class="field-name">Adresse</span>
                            </label>
                            
                           <div class="form_input">
                 {{ form_widget(form.adresse,{'attr':{'class':'large'}})}}  
                                                </div>
             
                        </li>
                                                
                            <li class="field-container">
                            <label for="unit">
                                <span class="field-name">Telephone</span>
                            </label>
                            
                           <div class="form_input">
                 {{ form_widget(form.tel,{'attr':{'class':'large'}})}}  
                                                </div>
             
                        </li>
                                         <li class="field-container">
                            <label for="unit">
                                <span class="field-name">Username</span>
                            </label>
                            
                           <div class="form_input">
                 {{ form_widget(form.username,{'attr':{'class':'large'}})}}  
                                                </div>
             
                        </li>
                        
                                         <li class="field-container">
                            <label for="unit">
                                <span class="field-name">Mot de passe </span>
                            </label>
                            
                           <div class="form_input">
                 {{ form_widget(form.password,{'attr':{'class':'large'}})}}  
                                                </div>
             
                        </li>

                        
                        <li class="field-container">
                            <span class="field-name"></span>
                            <input type="submit" name="submit" value="{% if id == '' %}Ajouter la catégorie{% else %}Modifier la catégorie{% endif %}" class="submitInput ui-button ui-widget ui-state-default ui-corner-all" role="button">
                            <input type="reset" value="Initialiser" class="submitInput ui-button ui-widget ui-state-default ui-corner-all" role="button"/>
                        </li> 
                    </ul>

                    
                </form>
                <script language="JavaScript">
                var frmvalidator  = new Validator("addproduct");
                frmvalidator.addValidation("pr_code","req","<?php echo $LANG['code_error']; ?>...");
                frmvalidator.addValidation("pr_name","req","<?php echo $LANG['description_error']; ?>...");
				frmvalidator.addValidation("quantity","req","<?php echo $LANG['quantity_error']; ?>...");
				frmvalidator.addValidation("quantity","num","<?php echo $LANG['quantity_error2']; ?>...");
				frmvalidator.addValidation("unit","req","<?php echo $LANG['unit_error']; ?>...");
				frmvalidator.addValidation("alert_qt","req","<?php echo $LANG['alert_qt_error']; ?>...");
				frmvalidator.addValidation("alert_qt","num","<?php echo $LANG['alert_qt_error2']; ?>...");
				// frmvalidator.addValidation("image","req","Please select product image to upload...");
                </script>

                <div class="clear"></div>
            </div>
        </div>
    </div>
        <div class="clear"><!-- --></div>
</div>

<div class="clr"></div>

  </div>
  <div class="clear"></div>

</div>

{% endblock body %}